#TARFILES = Makefile scanner.mll parser.mly ast.mli sast.mli
# synap.ml

OBJS = parser.cmo scanner.cmo sast.cmo dimlist.cmo printer.cmo ppm.cmo params.cmo eval.cmo translate1.cmo translate2.cmo validate.cmo synap.cmo

synap : $(OBJS)
	ocamlc -cclib -lstr -cclib -lbigarray -o synap bigarray.cma str.cma $(OBJS)

translate : $(OBJS)
	ocamlc -cclib -lstr -o translate str.cma $(OBJS)

.PHONY : test
test : synap testall.sh
	./testall.sh

scanner.ml : scanner.mll
	ocamllex scanner.mll

parser.ml parser.mli : parser.mly
	ocamlyacc -v parser.mly

%.cmo : %.ml
	ocamlc -c $<

synap.cmo : synap.ml
	ocamlc -c synap.ml 

%.cmi : %.mli
	ocamlc -c $<

.PHONY : clean
clean :
	rm -f synap parser.ml parser.mli scanner.ml *.cmo *.cmi

# Generated by ocamldep *.ml *.mli
#    (after a make - needs parser.ml -and possibly other files- to be generated )
dimlist.cmo: 
dimlist.cmx: 
eval.cmo: types.cmi sast.cmo printer.cmo params.cmo 
eval.cmx: types.cmi sast.cmx printer.cmx params.cmx 
params.cmo: types.cmi sast.cmo printer.cmo ppm.cmo ast.cmi 
params.cmx: types.cmi sast.cmx printer.cmx ppm.cmx ast.cmi 
parser.cmo: ast.cmi parser.cmi 
parser.cmx: ast.cmi parser.cmi 
ppm.cmo: 
ppm.cmx: 
printer.cmo: types.cmi sast.cmo 
printer.cmx: types.cmi sast.cmx 
sast.cmo: types.cmi 
sast.cmx: types.cmi 
synap.cmo: validate.cmo types.cmi translate2.cmo translate1.cmo sast.cmo \
    printer.cmo ppm.cmo parser.cmi params.cmo eval.cmo ast.cmi 
synap.cmx: validate.cmx types.cmi translate2.cmx translate1.cmx sast.cmx \
    printer.cmx ppm.cmx parser.cmx params.cmx eval.cmx ast.cmi 
translate1.cmo: types.cmi sast.cmo printer.cmo params.cmo ast.cmi 
translate1.cmx: types.cmi sast.cmx printer.cmx params.cmx ast.cmi 
translate2.cmo: types.cmi sast.cmo printer.cmo eval.cmo dimlist.cmo 
translate2.cmx: types.cmi sast.cmx printer.cmx eval.cmx dimlist.cmx 
validate.cmo: types.cmi sast.cmo ast.cmi 
validate.cmx: types.cmi sast.cmx ast.cmi 
ast.cmi: 
parser.cmi: ast.cmi 
types.cmi: 

